<template>
  <div class="content-main">
    <div>
      <el-form :inline="true" :model="form" ref="form">
         <BaseFormInput
          label="账户名称"
          prop="name"
          :span="24"
          labelwidth="100px"
        />
      </el-form>
    </div>
    <div class="content-search">
      <el-button class="btnStyle" icon="el-icon-search" @click="search"
        >查询</el-button
      >
      <el-button icon="el-icon-refresh-right" @click="reset">重置</el-button>
    </div>
    <div class="content-edit">
      <el-button class="btnStyle" icon="el-icon-plus" @click="add"
        >添加</el-button
      >
    </div>
    <el-row class="content_row">
      <el-col :span="5">
        <TreeArea></TreeArea>
      </el-col>
      <el-col :span="19">
        <table-area
          :loading="loading"
          :page="page"
          :size="size"
          :total="total"
          :list="list"
          @current-change="currentChange"
          @size-change="sizeChange"
          @edit="edit"
          @del="del"
        />
      </el-col>
    </el-row>
    <edit-modal :show="editModal" :info="editModalInfo" @close="close" />
  </div>
</template>

<script>
import TableArea from "./TableArea.vue";
import EditModal from "./EditModal.vue";
import TreeArea from "./TreeArea.vue";
import {TABLE_SETTING} from '@/config/setting.js'

export default {
  components: {
    TableArea,
    EditModal,
    TreeArea,
  },
  data() {
    return {
      form: {
        name: "",
      },
      editModal: false,
      editModalInfo: null,
      loading:false,
      page:TABLE_SETTING.PAGE,
      size:TABLE_SETTING.SIZE,
      total:0,
      list:[],
    };
  },
  mounted() {
  },
  methods: {
    add() {
      this.editModal = true;
    },
    search(){},
    reset(){},
    // 弹窗关闭
    close() {
      this.editModal = false;
    },
    currentChange() {},
    sizeChange() {},
    edit() {},
    del() {},
  },
};
</script>

<style lang="scss">
.content_row {
  margin-top: 20px;
}
</style>
